﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DALScolarite;
namespace Scolarite 
{
    public partial class ListeUEECU : Form
    {
        public ListeUEECU()
        {
            InitializeComponent();
        }

        private void ListeUEECU_Load(object sender, EventArgs e)
        {
            scolarite_eltdiplome diplome = new scolarite_eltdiplome();
            scolariteeltdiplomeBindingSource.DataSource = diplome.diplome();
        }

        private void scolarite_ensunitesDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void DiplomeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {

            scolarite_ensunites unite = new scolarite_ensunites();
            if (DiplomeComboBox.SelectedValue != null )
            {
                scolarite_ensunitesBindingSource.DataSource = unite.unite(DiplomeComboBox.SelectedValue.ToString());
            }

            
        }

        private void scolarite_ensunitesDataGridView_DoubleClick(object sender, EventArgs e)
        {

        }

        private void scolarite_ensunitesDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow row = this.scolarite_ensunitesDataGridView.Rows[e.RowIndex];


            EUECU fiche = new EUECU();
            fiche.MdiParent = this.MdiParent;
            fiche.loadingmod = modeload.INFO;
            fiche.idunite = (string)row.Cells[0].Value;
            fiche.Show();
        }
    }
}
